package com.swpu.demo.service.impl;

import com.swpu.demo.entity.PersonalData;
import com.swpu.demo.entity.SysUser;
import com.swpu.demo.mapper.PersonalDataMapper;
import com.swpu.demo.service.PersonalDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author Author Name
 * @since 2021-05-12
 */
@Service
public class PersonalDataServiceImpl implements PersonalDataService {
    @Autowired
    PersonalDataMapper personalDataMapper;

    @Override
    public PersonalData selectOneUser(String username) {
        return personalDataMapper.selectOneUser(username);
    }

    @Override
    public List<PersonalData> listAllUsers() {
        return personalDataMapper.listAllUsers();
    }

    @Override
    public int addOneUser(PersonalData user) {
        return personalDataMapper.addOneUser(user);
    }

    @Override
    public int updateOneUser(PersonalData user) {
        return personalDataMapper.updateOneUser(user);
    }

    @Override
    public int updateUserPass(String passWord) {
        return personalDataMapper.updateUserPass(passWord);
    }

    @Override
    public int deleteOneUser(int id) {
        return personalDataMapper.deleteOneUser(id);
    }
}
